import * as NS from "../../Common/NetServices";
import { IsNull } from "../../TYLibrary/Common/GlobalExtend";
import {
    Wx_XSPPage,
    V_Product,
    V_ShoppingCart,
    V_ShoppingCartHelper,
    V_Order
} from "../../Common/Entitys";
import { Log } from "../../TYLibrary/System/Logger";
import { Wx_PageData, WXDataClassRuntimeDecorator } from "../../Common/EntityBase";

@WXDataClassRuntimeDecorator()
class DetailPageData extends Wx_PageData {
    public OrderDetail: any = [];
}

class DetailPage extends Wx_XSPPage {
    public Data: DetailPageData = new DetailPageData();

    /**
     *
     * @memberof DetailPage
     */
    public async onShowAgain() {}

    /**
     * 初始化页面信息
     * @param {any} options
     * @returns {Promise<void>}
     * @memberof IndexPage
     */
    public async InitData(options: any): Promise<void> {
        console.log(options.OrderId, "options.OrderId");
        let OrderDetail = NS.QueryOrderDetails(options.OrderId);
        // let order=OrderDetail as V_Order;
        console.log(OrderDetail, "OrderDetail");
        this.Data.OrderDetail = OrderDetail;
        this.Data.ApplyChange(this);
    }
}

Page(new DetailPage());
